<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMemberCardBatchesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member_card_batches', function (Blueprint $table) {
            $table->id()->comment('会员卡批次表');
            $table->string('title',255)->comment('批次名称');
            $table->integer('total_num')->comment('生成卡数量');
            $table->timestamp('use_start_time')->comment('体验开始时间');
            $table->timestamp('use_end_time')->comment('体验结束时间');
            $table->integer('use_num')->nullable()->comment('使用数量');
            $table->string('use_day')->comment('体验天数');
            $table->integer('sort')->comment('排序');
            $table->string('qrcode',255)->comment('二维码图路径');
            $table->tinyInteger('status')->default(1)->comment('是否生效,控制此批次所有卡0：不生效；1：生效');
            $table->string('remark',32)->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('member_card_batches');
    }
}
